package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 积分记录对象 credit_record
 *
 * @author xukai
 * @date 2024-12-22
 */
public class CreditRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 类型 */
    @Excel(name = "类型")
    private String type;

    /** 事件 */
    @Excel(name = "事件")
    private String title;

    /** 用户id */
    @Excel(name = "用户id")
    private String userId;

    /** 积分数量 */
    @Excel(name = "积分数量")
    private Long credit;

    /** 发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }
    public void setCredit(Long credit)
    {
        this.credit = credit;
    }

    public Long getCredit()
    {
        return credit;
    }
    public void setTime(Date time)
    {
        this.time = time;
    }

    public Date getTime()
    {
        return time;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("type", getType())
                .append("title", getTitle())
                .append("userId", getUserId())
                .append("credit", getCredit())
                .append("time", getTime())
                .toString();
    }
}
